# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-retry
_pkgname=retry
pkgver=0.9.2
_pyver=3.13
pkgrel=8
pkgdesc='Easy to use retry decorator.'
arch=('any')
url='https://pypi.org/project/retry/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('266259cb212a4d50ad16fc818baa91654bc5188d917955fd6156840b77a2fca7f0f7dc5f3732fb790dc6990052b94d5bbfdc4820e81b4eeb5afecf5a6d86c78e')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  chmod 644 \
    "$pkgdir/usr/lib/python$_pyver/site-packages/$_pkgname-$pkgver-py$_pyver.egg-info/"*
}

